﻿<%--
 *  File:    PriceListSummary.jsp
 *  @Author: Peter Shen
 *  Date:    Wednesday, October 16, 2002

 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>
 

<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page import="com.oval.util.*" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="http://dcms.oval.com/page/dcms" prefix="dcms" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%
  Category cat = Category.getInstance("jsp.PriceListSummary2");
  String privilegeCode = "10Z02,10Z03,10Z04";
  String strModuleName = "ZYL";
  String strTableName = "ovpricelistsummary";


%>

<%@include file="/inc/PageDefault.inc"%>


<%@include file="/inc/FrmDefault.inc"%>
<%@include file="/inc/LocationDefault.inc"%>
<html>
<head>
<title>UserBatchModify</title>
<link rel="stylesheet" href="<%=request.getContextPath()%>/css/<%= strLanguageCode %>/main.css" type="text/css">
<link type="text/css" rel="stylesheet" href="<%=request.getContextPath()%>/css/<%= strLanguageCode %>/summary.css" />
<script language="JavaScript" src="<%=request.getContextPath()%>/js/ScriptLib.js"></script>
<script language="JavaScript" src="<%=request.getContextPath()%>/js/Calendar.js"></script>
<script>
  function page_batchsave()
  {
    var frm=document.getElementById("__fullEditFrm");
    frm.pagename.value="p_orgbatchmodify";
    frm.actionname.value="batchsave";
    return true;
  }
  function page_selectregion(sid)
  {
    document.getElementById("__temp_1__").value=sid;
   
    if(popwindow!=null)
    popwindow.close();
    popwindow = window.open('<%=request.getContextPath()%>/masterdata/ogm/RegionSelect.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&countrycode=CN' ,'newwindow', 'height=250, width=500,top=100,left=100,toolbar=n0, menubar=no, scrollbars=no, resizable=no, location=no, status=no');

  }
  
  
  
  function page_setRegion(code,name){
    
     var sid=document.getElementById("__temp_1__").value;
    var obj=document.getElementById(sid);
    document.getElementById(obj.refid).value=code;
 obj.value=name;
 
  
    if (popwindow != null)
      popwindow.close();
	
}
function page_selectcity(sid)
{
  var regioncode=document.getElementById('__batchmodify_regioncode__comb0_hidden');
  if(regioncode==null || regioncode.value==null || regioncode.value==' ' || regioncode.value=='')
  {
    alert("<%= message.getMessageDesc("MUST_SELECT_FIRST",label.getLabelName("L_Province"))%>");
    return;
  }
  document.getElementById("__temp_2__").value=sid;
   
    if(popwindow!=null)
    popwindow.close();
    popwindow = window.open('<%=request.getContextPath() %>/masterdata/ogm/CitySelect.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&countrycode=CN&regioncode=' + regioncode.value + '&flag=city&grade=1&parentcitycode=null','newwindow', 'height=250, width=400,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');

}
function page_selectcounty(sid)
{
  var regioncode=document.getElementById('__batchmodify_regioncode__comb0_hidden');
  if(regioncode==null || regioncode.value==null || regioncode.value==' ' || regioncode.value=='')
  {
    alert("<%= message.getMessageDesc("MUST_SELECT_FIRST",label.getLabelName("L_Province"))%>");
    return;
  }
  var citycode=document.getElementById('__batchmodify_citycode__comb0_hidden');
  if(citycode==null || citycode.value==null || citycode.value==' ' || citycode.value=='')
  {
    alert("<%= message.getMessageDesc("MUST_SELECT_FIRST",label.getLabelName("L_City"))%>");
    return;
  }
  document.getElementById("__temp_2__").value=sid;
   
    if(popwindow!=null)
    popwindow.close();
    popwindow = window.open('<%=request.getContextPath() %>/masterdata/ogm/CitySelect.jsp?<%= OvalTools.randomURL() %>&languagecode=<%= strLanguageCode %>&countrycode=CN&regioncode=' + regioncode.value + '&flag=county&grade=2&parentcitycode='+citycode.value,'newwindow', 'height=250, width=400,top=100,left=100,toolbar=n0, menubar=no, scrollbars=yes, resizable=no, location=no, status=no');

}
function page_setCity(code,name,id,flag)
{
  var sid=document.getElementById("__temp_2__").value;
    var obj=document.getElementById(sid);
    document.getElementById(obj.refid).value=code;
 obj.value=name;
 
  
    if (popwindow != null)
      popwindow.close();
}
</script>  
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
 <% 
 String glostr = "";
 String idstr  = "";
 
 if (request.getParameter("globalpccode")!= null){
	
	 glostr=request.getParameter("globalpccode");
	
    if (glostr.equals("113"))
    {  
    	idstr ="batchmodify.horganization"; 
    	
    } 
    else if(glostr.equals("114"))
    { 
    	idstr ="batchmodify.porganization"; 
    
    	
    } 
    else {
    	idstr ="batchmodify.organization";
    }	
 }
 %>
 
<dcms:summary id="<%=idstr %>" needExportCSV="true" needExportLabelDetail="true" hiddenDetailHeader="true" needBatchModify="true" preBatchSaveFunction="page_batchsave">
<dcms:param name="globalpccode" property="params:globalpccode"/>
</dcms:summary>

</body>
</html>